import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
import { RoleService } from './role.service';
import { ApiBearerAuth, ApiOperation, ApiProperty, ApiTags } from '@nestjs/swagger';
import { JwtGuard } from 'src/common/guards/jwt.guard';

@ApiTags('角色模块')
@Controller('role')
@UseGuards(JwtGuard)
@ApiBearerAuth()
export class RoleController {
  constructor(private readonly roleService: RoleService) {}

  @Get('getRoles')
  @ApiOperation({ summary: '获取所有角色' })
  getRoles() {
    return this.roleService.getRoles();
  }
}
